<template>
  <div class="top-nav flex-box">
    <div class="icon-svg back" @click="back"></div>
    <div class="flex text ellipsis">
      <slot></slot>
    </div>
    <div class="icon-svg svg_menu"></div>
  </div>
</template>

<script>
export default {
  name: "HeaderBack",
  computed: {
    userinfo() {
      return this.$store.state.userinfo;
    }
  },
  methods: {
    back() {
      this.$router.go(-1);
    }
  }
};
</script>
<style scoped lang="less">
.top-nav {
  align-items: center;
  height: 2.25rem;
  background: #32393e;
  .text {
    color: rgba(255, 255, 255, .8);
  }
  .icon-svg {
    width: 2.25rem;
    height: 2.25rem;
    background-size: 1.2rem auto;

  }
}
.back {
  background-image: url(/static/svg/back.svg);
}
.svg_menu {
  background-image: url(/static/svg/mored.svg);
}
</style>
